package ooday01;



/**学生类的测试类*/
public class StudentTest {
    public static void main(String[] args) {
        Student zs=new Student("张三",24,"001","jsd2302");
//        Student zs=new Student();
        //访问成员变量
//        zs.name="张三";
//        zs.age=24;
//        zs.stuId="001";
//        zs.className="jsd2302";
        //调用方法
        zs.study();
        zs.sayHi();
        zs.playWith("李四");
        Student dd=new Student("丹丹",12);
        dd.study();
        dd.playWith("李四");
        System.out.println(dd.name+dd.age);

        Student ls=new Student();
        ls.name="李四";
        ls.age=25;
        ls.className="jsd2302";
        ls.stuId="002";
        ls.study();
        ls.sayHi();
        ls.playWith("张三");
        //创建一个学生对象
        //给所有成员变量赋默认值
        Student ww=new Student();
        ww.study();
        ww.sayHi();
        ww.playWith("张三");


    }
}
